from WebBackend.dataclass.Configuration import ConfigurationItem

LOCAL_USER_OPTIONS: list[ConfigurationItem] = [
    {
        "key": "local_enable",
        "description": "允许本地用户登录",
        "default": 'YES'
    },
    {
        "key": "userlist_enable",
        "description": "启用用户黑白名单控制",
        "default": 'NO'
    },
    {
        "key": "userlist_deny",
        "description": "用户列表模式（'YES'=黑名单，'NO'=白名单）",
        "default": 'YES'
    },
    {
        "key": "chroot_local_user",
        "description": "将用户限制在家目录内",
        "default": 'YES'
    },
    {
        "key": "allow_writeable_chroot",
        "description": "允许被限制的用户家目录可写",
        "default": 'NO'
    },
    {
        "key": "local_umask",
        "description": "上传文件的默认权限掩码",
        "default": "022"
    },
    {
        "key": "chmod_enable",
        "description": "允许用户修改文件权限",
        "default": 'YES'
    },
    {
        "key": "max_clients",
        "description": "最大并发连接数",
        "default": 10
    },
    {
        "key": "max_per_ip",
        "description": "单个IP的最大连接数",
        "default": 3
    },
    {
        "key": "local_max_rate",
        "description": "本地用户传输速率限制（字节/秒）",
        "default": 102400
    },
    {
        "key": "idle_session_timeout",
        "description": "空闲会话超时时间（秒）",
        "default": 300
    },
    {
        "key": "check_shell",
        "description": "检查用户Shell有效性",
        "default": 'YES'
    },
    {
        "key": "passwd_chroot_enable",
        "description": "启用动态家目录映射",
        "default": 'NO'
    },
    {
        "key": "user_config_dir",
        "description": "用户独立配置目录路径",
        "default": ""
    }
]
